import { getTeacher, setTeacherSave } from '../../api/teacher';


const state = {
    list: []
}

const mutations = {
    GET_LIST(state, list) {
        state.list = list
    }
}


const actions = {
    async getList({ commit }) {
        const data = await getTeacher()
        commit("GET_LIST", data.data)
    },
    async setList({ commit }, ruleForm) {
        const data = await setTeacherSave(ruleForm)
        console.log(data);
    }
}


export default {
    namespaced: true,
    state,
    mutations,
    actions
}